const express = require('express');
const router = express.Router();
const userCtrl = require('../controller/user');
const userValidator = require('../validator/user');
const fs = require('fs-extra');

//登录用户
router.post('/users/login',userValidator.login,userCtrl.login);

//获取当前用户信息
router.get('/user',userCtrl.getUserMess);

//用户注册
router.post('/users',userValidator.register,userCtrl.register);

// 更新用户信息
router.put('/user',userCtrl.updateMess);



module.exports = router